<template>
	<view class="">
		<input type="text" v-model="person.name" />
	</view>
</template>

<script setup>
	import {
		ref,
		watch
	} from "vue";
	const person = ref({
		name: "zhangsan",
		age: 23,
	});
	watch(
		() => person.value.name,
		(newValue, oldValue) => {
			console.log(newValue);
			console.log(oldValue);
		}, {
			immediate: true,
		}
	);
</script>

<style lang="scss" scoped></style>